package com.ceadeal.admin.common.api;

/**
 * 功能描述: 错误代码枚举
 *
 * 作者: Yzw
 * 日期: 2017-03-01 16:18:05
 */
public enum ApiResultEnum {

    SUCCESS                 (0, "成功"),
    ERROR_400               (400, "错误的请求"),
    ERROR_401               (401, "无权限"),
    ERROR_403               (403, "禁止访问"),
    ERROR_404               (404, "找不到资源"),
    ERROR_405               (405, "不允许的请求方法"),
    ERROR_415               (405, "不支持的媒体类型"),
    ERROR_500               (500, "服务器内部错误"),
    INTERNAL_ERROR          (300301, "内部错误"),
    PARAMETER_ERROR         (300302, "参数异常"),
    LOGIN_ERROR             (1001, "登陆异常"),
    ;

    private int code;
    private String msg;

    ApiResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
